package com.zjipc.mpjdemo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.google.gson.Gson;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors
@TableName("user")
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private Long addressId;
    private Integer sex;
    private String headImg;
    @TableLogic
    private Boolean del;

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
